<!DOCTYPE html>
<html lang="en">
<head>
	<include data="../head.html">
	<title>{$title}</title>
	<style>
	html, body{height: 100%;}
	#filename{padding: 10px;margin: 0;background: #fff;}
	#folder-list{width: 280px;overflow: auto;position: absolute;border: #ddd solid 1px;top: 40px;bottom: 0;}
	#folder-list .list-group{background-color: transparent;margin: 0;}
	#folder-list .list-group:hover{background-color: transparent;}
	#folder-list .list-group-item{white-space: nowrap;padding: 2px 0;margin:0;cursor: default;background-color: transparent;border:none;min-width: 278px;}
	#folder-list .list-group-item:hover{background-color: #f5f5f5;}
	#folder-list .list-group-item.active{background-color: #dedede !important;}
	#folder-list>.list-group{display: inline-block;margin-right: 0;}
	#folder-list>.list-group>li{margin-right: -20px;}
	#folder-list li.has-children+li:hover{background-color: transparent !important;}
	#folder-list i{margin-right: 1px;top: 0;}
	#edit-container{position: absolute;top: 40px;right: 0;left: 280px;bottom: 0;}
	#file-editor{width: 100%;height: 100%;}
	#file-editor textarea{width: 100%;height: 100%;white-space:nowrap; overflow:scroll;float: right;padding-left: 4px;resize: none;outline: none;}
	#file-editor button{display: none;}
	@media(max-width: 767px){
		#folder-list{width: 100%;position: relative;top: 0;display: block;border-left: none;border-right: none;}
		#folder-list>.list-group{width: 100%;display: block;}
		#folder-list>.list-group>li{margin-right: 0;}
		#edit-container{display: block;position: relative;width: 100%;top: 0;left: 0;}
		#file-editor textarea{resize: vertical;min-height: 400px;}
	}
	</style>
</head>
<body data-menu="features">
	<if data="!empty($_GET['folder'])">
		<h4 id="filename" data-text="{$title}">{$title}</h4>
		<div class="container">
			<div id="folder-list">
				{admin_get_template_files($template)}
			</div>
			<div id="edit-container">
				<form id="file-editor" action="{SITE_URL}mod.php?file::putContent" method="post">
					<input type="hidden" name="filename" value="">
					<textarea name="content" required placeholder="请选择需要编辑的文件"></textarea>
					<button type="submit">提交</button>
				</form>
			</div>
		</div>
	</if>
	<include data="../foot.html">
</body>
</html>